<template>
	<view>
		
		
		<view class="fs26 p20" v-html='list'>
			
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				type:0,
				id:"",
				list:""
			}
		},
		onLoad(option) {
			this.type= option.type
			this.id= option.id
			if(this.type== 2  || this.type == 1) {
				this.postconfig()
			}
			if(this.type== 0 || this.type== 3) {
				this.postshuom(this.type)
			}
			if(this.type== 5) {
				this.postshuom(1)
			}
			if(this.type== 6) {
				this.postshuom(2)
			}
		},
		methods: {
			postshuom(index) {
				let that = this
				that.api.post('index/getSystem', {
					type:index
				}).then(res => {
					console.log(res);
					if (res.code == 200) {
						res.data = res.data.replace(/\<img/gi,
							'<img class="rich_text_img" ')
							this.list = res.data
					}
							
							
				})
			},
			postconfig() {
				let that = this
				that.api.post('index/newsItem', {
					id: this.id
				}).then(res => {
					console.log(res);
					if (res.code == 200) {
						res.data.content = res.data.content.replace(/\<img/gi,
							'<img class="rich_text_img" ')
							this.list = res.data.content
					}
			
			
				})
			},
		}
	}
</script>

<style>

</style>
